﻿@model Chaine.Models.RegisterModel
@{
    ViewBag.Title = "Edit Member Info";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section maincontent{
    <h2 class="page-header">
        @ViewBag.Title</h2>
    @using (Html.BeginForm())
    {
        <div class="form-horizontal">
            <div class="control-group">
                <label class="control-label">
                    Username
                </label>
                <div class="controls">
                    <label>@Model.UserName</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Email
                </label>
                <div class="controls">
                    <label>@Model.Email</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Real Name
                </label>
                <div class="controls">
                    <label>@Model.RealName</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Mobile
                </label>
                <div class="controls">
                    <label>@Model.Mobile</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Gender
                </label>
                <div class="controls">
                    <label>@Model.Gender</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Nationality
                </label>
                <div class="controls">
                    <label>@Model.Nationality</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Address
                </label>
                <div class="controls">
                    <label>@Model.Address</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    PostCode
                </label>
                <div class="controls">
                    <label>@Model.PostCode</label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Is System Administrator</label>
                <div class="controls">
                    <label class="radio">
                        @{
        var isAdmin = Roles.IsUserInRole(Model.UserName, "admin");
                        }
                        @Html.RadioButton("IsAdmin", true, isAdmin)
                        Yes</label>
                    <label class="radio">
                        @Html.RadioButton("IsAdmin", false, !isAdmin)
                        No
                    </label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Email Is validated</label>
                <div class="controls">
                    <label class="radio">
                        @Html.RadioButton("EmailIsValidated", true, Model.EmailIsValidated)
                        Yes</label>
                    <label class="radio">
                        @Html.RadioButton("EmailIsValidated", false, !Model.EmailIsValidated)
                        No
                    </label>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label">
                    Is Approved</label>
                <div class="controls">
                    <label class="radio">
                        @Html.RadioButton("IsApproved", true, Model.IsChecked)
                        Yes</label>
                    <label class="radio">
                        @Html.RadioButton("IsApproved", false, !Model.IsChecked)
                        No
                    </label>
                </div>
            </div>
            <div class="form-actions">
                <input type="submit" value="Save" class="btn btn-primary" />
                @Html.ActionLink("Delete", "delete", new { id = Model.Id }, new { @class = "btn btn-danger" })
                @Html.ActionLink("Cancel", "index", null, new { @class = "btn" })
            </div>
        </div>    
    }
}
@section sidebar{
    @Html.Partial("~/views/shared/_AdminSidebar.cshtml")
}
